package com.haohao.system.service.impl;

import java.util.List;
import com.haohao.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.haohao.system.mapper.SysInfoMapper;
import com.haohao.system.domain.SysInfo;
import com.haohao.system.service.ISysInfoService;

/**
 * 库存记录Service业务层处理
 * 
 * @author haohao
 * @date 2024-04-10
 */
@Service
public class SysInfoServiceImpl implements ISysInfoService 
{
    @Autowired
    private SysInfoMapper sysInfoMapper;

    /**
     * 查询库存记录
     * 
     * @param id 库存记录主键
     * @return 库存记录
     */
    @Override
    public SysInfo selectSysInfoById(Long id)
    {
        return sysInfoMapper.selectSysInfoById(id);
    }

    /**
     * 查询库存记录列表
     * 
     * @param sysInfo 库存记录
     * @return 库存记录
     */
    @Override
    public List<SysInfo> selectSysInfoList(SysInfo sysInfo)
    {
        return sysInfoMapper.selectSysInfoList(sysInfo);
    }

    /**
     * 新增库存记录
     * 
     * @param sysInfo 库存记录
     * @return 结果
     */
    @Override
    public int insertSysInfo(SysInfo sysInfo)
    {
        sysInfo.setCreateTime(DateUtils.getNowDate());
        return sysInfoMapper.insertSysInfo(sysInfo);
    }

    /**
     * 修改库存记录
     * 
     * @param sysInfo 库存记录
     * @return 结果
     */
    @Override
    public int updateSysInfo(SysInfo sysInfo)
    {
        return sysInfoMapper.updateSysInfo(sysInfo);
    }

    /**
     * 批量删除库存记录
     * 
     * @param ids 需要删除的库存记录主键
     * @return 结果
     */
    @Override
    public int deleteSysInfoByIds(Long[] ids)
    {
        return sysInfoMapper.deleteSysInfoByIds(ids);
    }

    /**
     * 删除库存记录信息
     * 
     * @param id 库存记录主键
     * @return 结果
     */
    @Override
    public int deleteSysInfoById(Long id)
    {
        return sysInfoMapper.deleteSysInfoById(id);
    }
}
